package com.apabi.web.controller.api;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by teng on 2018/1/16.
 */
@Controller
@RequestMapping("/api/analysis/journal")
public class JournalAnalysisController {

    @RequestMapping(value = "/{issn}/trend/year",method = RequestMethod.GET)
    public @ResponseBody ObjectNode trendYear(@PathVariable String issn) {
        ObjectMapper mapper = new ObjectMapper();
        ObjectNode rootNode = mapper.createObjectNode();
        rootNode.put("code",200);
        rootNode.put("message","测试");
        return rootNode;
    }

    @RequestMapping(value = "/{issn}/trend/if",method = RequestMethod.GET)
    public @ResponseBody ObjectNode trendIf(@PathVariable String issn) {
        ObjectMapper mapper = new ObjectMapper();
        ObjectNode rootNode = mapper.createObjectNode();
        rootNode.put("code",200);
        rootNode.put("message","测试");
        return rootNode;
    }

    @RequestMapping(value = "/{issn}/trend/cited",method = RequestMethod.GET)
    public @ResponseBody ObjectNode trendCited(@PathVariable String issn) {
        ObjectMapper mapper = new ObjectMapper();
        ObjectNode rootNode = mapper.createObjectNode();
        rootNode.put("code",200);
        rootNode.put("message","测试");
        return rootNode;
    }
}
